Extraction and matching of characteristic fingerprints from audio signals

ABSTRACT

An audio fingerprint is extracted from an audio sample, where the fingerprint contains information that is characteristic of the content in the sample. The fingerprint may be generated by computing an energy spectrum for the audio sample, resampling the energy spectrum logarithmically in the time dimension, transforming the resampled energy spectrum to produce a series of feature vectors, and computing the fingerprint using differential coding of the feature vectors. The generated fingerprint can be compared to a set of reference fingerprints in a database to identify the original audio content.

BACKGROUND

1. Field of the Invention

The present invention relates generally to audio signal processing, andmore particularly to extracting characteristic fingerprints from audiosignals and to searching a database of such fingerprints.

2. Background of the Invention

Because of the variations in file formats, compression technologies, andother methods of representing data, the problem of identifying a datasignal or comparing it to others raises significant technicaldifficulties. For example, in the case of digital music files on acomputer, there are many formats for encoding and compressing the songs.In addition, the songs are often sampled into digital form at differentdata rates and have different characteristics (e.g., differentwaveforms). Recorded analog audio also contains noise and distortions.These significant waveform differences make direct comparison of suchfiles a poor choice for efficient file or signal recognition orcomparison. Direct file comparison also does not allow comparison ofmedia encoded in different formats (e.g., comparing the same songencoded in MP3 and WAV).

For these reasons, identifying and tracking media and other content,such as that distributed over the Internet, is often done by attachingmetadata, watermarks, or some other code that contains identificationinformation for the media. But this attached information is oftenincomplete, incorrect, or both. For example, metadata is rarelycomplete, and filenames are even more rarely uniform. In addition,approaches such as watermarking are invasive, altering the original filewith the added data or code. Another drawback of these approaches isthat they are vulnerable to tampering. Even if every media file were toinclude accurate identification data such as metadata or a watermark,the files could be “unlocked” (and thus pirated) if the information weresuccessfully removed.

To avoid these problems, other methods have been developed based on theconcept of analyzing the content of a data signal itself. In one classof methods, an audio fingerprint is generated for a segment of audio,where the fingerprint contains characteristic information about theaudio that can be used to identify the original audio. In one example,an audio fingerprint comprises a digital sequence that identifies afragment of audio. The process of generating an audio fingerprint isoften based on acoustical and perceptual properties of the audio forwhich the fingerprint is being generated. Audio fingerprints typicallyhave a much smaller size than the original audio content and thus may beused as a convenient tool to identify, compare, and search for audiocontent. Audio fingerprinting can be used in a wide variety ofapplications, including broadcast monitoring, audio contentorganization, filtering of content of P2P networks, and identificationof songs or other audio content. As applied to these various areas,audio fingerprinting typically involves fingerprint extraction as wellas fingerprint database searching algorithms.

Most existing fingerprinting techniques are based on extracting audiofeatures from an audio sample in the frequency domain. The audio isfirst segmented into frames, and for every frame a set of features iscomputed. Among the audio features that can be used are Fast FourierTransform (FFT) coefficients, Mel Frequency Cepstral Coefficients(MFCC), spectral flatness, sharpness, Linear Predictive Coding (LPC)coefficients, and modulation frequency. The computed features areassembled into a feature vector, which is usually transformed usingderivatives, means, or variances. The feature vector is mapped into amore compact representation using algorithms such as Hidden Markov Modelor Principal Component Analysis, followed by quantization, to producethe audio fingerprint. Usually, a fingerprint obtained by processing asingle audio frame has a relatively small size and may not besufficiently unique to identify the original audio sequence with thedesired degree of reliability. To enhance fingerprint uniqueness andthus increase the probability of correct recognition (and decrease falsepositive rate), small sub fingerprints can be combined into largerblocks representing about three to five seconds of audio.

One fingerprinting technique, developed by Philips, uses a short-timeFourier Transform (STFT) to extract a 32-bit sub-fingerprint for everyinterval of 11.8 milliseconds of an audio signal. The audio signal isfirst segmented into overlapping frames 0.37 seconds long, and theframes are weighed by a Hamming window with an overlap factor of 31/32and transformed into the frequency domain using a FFT. The frequencydomain data obtained may be presented as a spectrogram (e.g., atime-frequency diagram), with time on the horizontal axis and frequencyon the vertical axis. The spectrum of every frame (spectrogram column)is segmented into 33 non-overlapping frequency bands in the range of 300Hz to 2000 Hz, with logarithmic spacing. The spectral energy in everyband is calculated, and a 32-bit sub-fingerprint is generated using thesign of the energy difference in consecutive bands along the time andfrequency axes. If the energy difference between two bands in one frameis larger that energy difference between the same bands in the previousframe, the algorithm outputs “1” for the corresponding bit in thesub-fingerprint; otherwise, it outputs “0” for the corresponding bit. Afingerprint is assembled by combining 256 subsequent 32-bitsub-fingerprints into single fingerprint block, which corresponds tothree seconds of audio.

Although designed to be robust against common types of audio processing,noise, and distortions, this algorithm is not very robust against largespeed changes because of the resulting spectrum scaling. Accordingly, amodified algorithm was proposed in which audio fingerprints areextracted in the scale-invariant Fourier-Mellin domain. The modifiedalgorithm includes additional steps performed after transforming theaudio frames into the frequency domain. These additional steps includespectrum log-mapping followed by a second Fourier transform. For everyframe, therefore, a first FFT is applied, the result is log-mappedobtained a power spectrum, and a second FFT is applied. This can bedescribed as the Fourier transform of the logarithmically resampledFourier transform, and it is similar to well known MFCC methods widelyused in speech recognition. The main difference is that Fourier-Mellintransform uses log-mapping of whole spectrum, while MFCC is based on themel-frequency scale (linear up to 1 kHz and has log spacing for higherfrequencies, mimicking the properties of the human auditory system).

The Philips algorithm falls into a category of so-called short-termanalysis algorithms because the sub-fingerprints are calculated usingspectral coefficients of just two consecutive frames. There are otheralgorithms that extract spectral features using multiple overlapped FFTframes in the spectrogram. Some of the methods based on evaluation ofmultiple frames in time are known as long-term spectrogram analysisalgorithms.

One long-term analysis algorithm, described for example in Sukittanon,“Modulation-Scale Analysis for Content Identification,” IEEETransactions on Signal Processing, vol. 52, no. 10 (October 2004), isbased on the estimation of modulation frequencies. In this algorithm,the audio is segmented and a spectrogram is computed for it. Amodulation spectrum is then calculated for each spectrogram band (e.g.,a range of frequencies in the spectrogram) by applying a secondtransform along the temporal row (e.g., the horizontal axis) of thespectrogram. This is different from the modified Philips approach, inwhich the second FFT is applied along the frequency column of thespectrogram (e.g., the vertical axis). In this approach, the spectrogramis segmented into N frequency bands, and the same number N of continuouswavelet transforms (CWT) are calculated, one for each band.

Although the developers of this algorithm claim superior performancecompared to the Philips algorithm, existing algorithms still exhibit anumber of deficiencies. For example, the algorithms may not besufficiently robust to identify distorted speech and music reliably,especially when the audio is compressed using a CELP audio codec (e.g.,associated with cell phone audio, such as GSM). Moreover, thesealgorithms are generally sensitive to noise and analog distortions, suchas those associated with a microphone recording. And even if thealgorithms can identify audio in presence of single type of distortion,they may not be able to handle a combination of multiple distortions,which is more common and closer to a real world scenario (e.g., as witha cell phone, audio recorded from a microphone in a noisy room withlight reverberation followed by GSM compression).

When applied to practical applications, therefore, existingfingerprinting schemes have unacceptably high error rates (e.g., falsepositives and false negatives), produce fingerprints that are too largeto be commercially viable, and/or are too slow. Accordingly, thereexists a need to overcome existing limitations that current audiorecognition techniques have failed to solve.

SUMMARY OF THE INVENTION

Accordingly, the present invention enables a characteristic fingerprintto be extracted from an audio signal based on the content of thatsignal. This fingerprint can be matched against a set of referencefingerprints (e.g., in a database) to determine the identity of thesignal or the similarity between two signals. Because of the nature ofthe fingerprint extraction algorithm, it does not suffer from many ofthe problems that plague existing solutions, and as compared to suchsolutions it is fast, efficient, highly accurate, scalable, and robust.

In an embodiment of a method for generating an audio fingerprint, anaudio signal is sampled and spectrogram information is computed from thesignal. The spectrogram is divided into a plurality of frequency bands.The sequences samples in each of the bands are logarithmicallyre-sampled, causing a log-mapping of the band samples. A second FFT isthen applied to the log-mapped band samples to obtain a feature vectorfor each band. The audio fingerprint is then computed based on thefeature vectors. The audio fingerprint may be stored on a computerreadable medium or may be fixed momentarily as a transmissible signal.

Unlike previous audio fingerprinting schemes, embodiments of theinvention extract a long-term feature vector from a series of frequencyband samples non-linearly (e.g., logarithmically) spaced in time.Although previous methods have used log mapping along the frequency axisof the spectrogram (e.g., the Fourier-Mellin transform and the barkscale), they have used a linear time scale. In contrast, in embodimentsof the invention, the use of a nonlinear (e.g., logarithmic) time scalefor processing the sub-band samples can significantly improve therobustness of the fingerprint extraction and matching algorithms.

For example, time log-mapping of the sub-band samples makes thealgorithm less sensitive to variations in audio playback speed and timecompression and stretching. This is because the logarithmic resamplingcauses any scaling in the playback speed to be a linear shift in thelog-mapped spectrogram, and the linear shift is removed by the FFT. Inthis way, the fingerprint of an audio signal should have little or novariation regardless of variations in its playback speed or due to timecompression or stretching. The usage of the logarithmic time scale alsoimproves the low frequency resolution of the second time-frequency FFTtransform. This allows the use of a simple FFT instead of complexwavelet transforms used for analysis of the spectrogram modulationspectrum, making the implementation more efficient and faster comparedto previous methods.

Moreover, because of the nonlinear (e.g., logarithmic) resealing intime, the band output frame contains, for the most part, samples thatrepresent the beginning of the analyzed audio sequence. The resultingfingerprint is thus generated using samples primarily located at thebeginning of the sequence. Since a relatively small part of the audiosequence make the most contribution in the resulting fingerprint, thefingerprint may be used to match shorter audio sequences. In oneimplementation, for example, a fingerprint generated from a five-secondoriginal audio frame can be reliably matched to samples taken from audiofragments that are twice as short.

Embodiments of the fingerprinting techniques are also tolerant to noiseand signal distortions. One implementation can detect speech-likesignals in the presence of 100% of white noise (i.e., a signal to noiseration of 0 db). The techniques are also tolerant to filtering,compression, frequency equalization, and phase distortions. For example,an embodiment of the invention is able to recognize reliably audio thathas a ±5% variation in pitch (under conditions of preserved tempo) and a±20% variation in timing (under conditions of preserved pitch).

In another embodiment, where the generated fingerprint frame is formedusing a specified number of frequency bands, an acoustic model is usedto mark insignificant frequency bands. Insignificant bands may includebands that do not add substantially any perceptible value indistinguishing the audio sample. Processing only relevant frequencybands increases the signal to noise ratio and improves robustness of theoverall fingerprint matching process. Moreover, excluding irrelevantfrequency bands can greatly improve the recognition efficiency ofband-limited audio content, for example in case of speech encoded atvery low bit rate or analog recordings with slow tape speed.

Embodiments of the invention also provide for fast indexing andefficient searching for fingerprints in a large-scale database. Forexample, an index for each audio fingerprint may be computed from aportion of the fingerprint's contents. In one embodiment, a set of bitsfrom a fingerprint is used as the fingerprint's index, where the bitscorrespond to the more stable low frequency coefficients due to thenon-linear (e.g., logarithmic) resampling. To match a test fingerprintwith a set of fingerprints in a database, the test fingerprint may bematched against the indexes to obtain a group of candidate fingerprints.The test fingerprint is then matched against the candidate fingerprints,thereby avoiding the need to match the test fingerprint against everyfingerprint in the database.

In another embodiment, an edge detection algorithm is used to determinethe exact edges of an analyzed audio frame or fragment. In someapplications, especially when audio samples differ only during shorttime periods of the overall samples, knowing the location of the edge ofthe analyzed audio frame within the audio sample is important. The edgedetection algorithm may use linear regression techniques to identify theedge of an audio frame.

Applications of embodiments of the fingerprinting technology arenumerous, and they include the real-time identification of audio streamsand other audio content (e.g., streaming media, radio, advertisements,Internet broadcasts, songs in CDs, MP3 files, or any other type of audiocontent). Embodiments of the invention thus enable efficient, real-timemedia content auditing and other reporting.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic drawing of a process for extracting and using afingerprint from an audio sample, in accordance with an embodiment ofthe invention.

FIG. 2 is a schematic diagram of a fingerprint extraction system, inaccordance with an embodiment of the invention.

FIG. 3 is a flow diagram of a matching algorithm, in accordance with anembodiment of the invention.

FIG. 4 illustrates an edge detection algorithm, in accordance with anembodiment of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Overview

Embodiments of the invention enable the extraction of characteristicinformation (e.g., an audio fingerprint) from a sample of audio as wellas the matching or identification of the audio using that extractedcharacteristic information. As illustrated in FIG. 1, a frame 105 ofaudio taken from an audio sample 100 is input into a fingerprintextraction algorithm 110. The audio sample 100 may be provided by any ofa wide variety of sources. Using the sequence of audio frames 105, thefingerprint extraction algorithm 110 generates one or more audiofingerprints 115 that are characteristic of the sequence. Serving as adistinguishing identifier, the audio fingerprint 115 providesinformation relating to the identity or other characteristics of thesequence of frames 105 of the audio sample 100. In particular, one ormore fingerprints 115 for the audio sample 100 may allow the audiosample 100 to be uniquely identified. Embodiments of the fingerprintextraction algorithm 110 are described in more detail below.

Once generated, the extracted fingerprint 115 can then be used in afurther process or stored on a medium for later use. For example, thefingerprint 115 can be used by a fingerprint matching algorithm 120,which compares the fingerprint 115 with entries in a fingerprintdatabase 125 (e.g., a collection of audio fingerprints from knownsources) to determine the identity of the audio sample 100. Variousmethods for using the fingerprints are also described below.

The audio sample 100 may originate from any of a wide variety ofsources, depending on the application of the fingerprinting system. Inone embodiment, the audio sample 100 is sampled from a broadcastreceived from a media broadcaster and digitized. Alternatively, a mediabroadcaster may transmit the audio in digital form, obviating the needto digitize it. Types of media broadcasters include, but are not limitedto, radio transmitters, satellite transmitters, and cable operators. Thefingerprinting system can thus be used to audit these broadcasters todetermine what audio are broadcast at what times. This enables anautomated system for ensuring compliance with broadcasting restrictions,licensing agreements, and the like. Because the fingerprint extractionalgorithm 110 may operate without having to know the precise beginningand ending of the broadcast signals, it can operate without thecooperation or knowledge of the media broadcaster to ensure independentand unbiased results.

In another embodiment, a media server retrieves audio files from a medialibrary and transmits a digital broadcast over a network (e.g., theInternet) for use by the fingerprint extraction algorithm 110. Astreaming Internet radio broadcast is one example of this type ofarchitecture, where media, advertisements, and other content isdelivered to an individual or to a group of users. In such anembodiment, the fingerprint extraction algorithm 110 and the matchingalgorithm 120 usually do not have any information regarding thebeginning or ending times of individual media items contained within thestreaming content of the audio sample 100; however, these algorithms 110and 120 do not need this information to identify the streaming content.

In another embodiment, the fingerprint extraction algorithm 110 receivesthe audio sample 100, or a series of frames 105 thereof, from a clientcomputer that has access to a storage device containing audio files. Theclient computer retrieves an individual audio file from the storage andsends the file to the fingerprint extraction algorithm 110 forgenerating one or more fingerprints 115 from the file. Alternatively,the client computer may retrieve a batch of files from storage 140 andsends them sequentially to the fingerprint extractor 110 for generatinga set of fingerprints for each file. (As used herein, “set” isunderstood to include any number of items in a grouping, including asingle item.) The fingerprint extraction algorithm 110 may be performedby the client computer or by a remote server coupled to the clientcomputer over a network.

Algorithm

One embodiment of a fingerprint extraction system 200 that implementsthe fingerprint extraction algorithm 110 shown in FIG. 1 is illustratedin FIG. 2. The fingerprint extraction system 200 comprises an analysisfilterbank 205, which is coupled to a plurality of processing channels(each including one or more processing modules, labeled here as elements210 and 215), which are in turn coupled to a differential encoder 225for producing an audio fingerprint 115. The fingerprint extractionsystem 200 is configured to receive an audio frame 105, for which anaudio fingerprint is to be generated.

Described in more detail below, for every input audio frame 105 theanalysis filterbank 205 generally computes power spectrum informationfor a received signal across a range of frequencies. In the embodimentshown, each processing channel corresponds to a frequency band withinthat range of frequencies, which bands may overlap. Accordingly, thechannels divide the processing performed by the fingerprint extractionsystem 200 so that each channel performs the processing for acorresponding band. In other embodiments, the processing for theplurality of bands may be performed in a single channel by a singlemodule, or the processing may be divided in any other configuration asappropriate for the application and technical limitations of the system.

The analysis filterbank 205 receives an audio frame 105 (such as theframe 105 from the audio sample 100 illustrated in FIG. 1). The analysisfilterbank 205 converts the audio frame 105 from the time domain intothe frequency domain to compute power spectrum information for the frame105 over a range of frequencies. In one embodiment, the power spectrumfor the signal in a range of about 250 to 2250 Hz is split into a numberof frequency bands (e.g., M bands, where M=13). The bands may have alinear or a logarithmic mid-frequency distribution (or any other scale)and also may overlap. The output of the filterbank contains a measure ofthe energy of the signal for each of a plurality of bands. In oneembodiment, the measure of the average energy is taken using the cubicroot of the average spectral energy in the band.

Various implementations of the analysis filterbank 205 are possible,depending on the software and hardware requirements and limitations ofthe system. In one embodiment, the analysis filterbank 205 comprises anumber of band-pass filters that isolate the signal of the audio frame105 for each of the frequency bands followed by energy estimation anddown sampling. In another embodiment, the analysis filterbank 205 isimplemented using a short-time Fast Fourier Transform (FFT). Forexample, the audio 100 sampled at 8 kHz is segmented into 64-ms frames105 (i.e., 512 samples). The power spectrum of each 50% overlappedsegment consisting of two audio frames 105 (i.e. 1024 samples) is thencalculated by Han windowing and performing an FFT, followed by bandfiltering using M evenly or logarithmically spaced overlapped trianglewindows.

In one embodiment, the power spectrum is averaged within frequency bandsand only changes of energy in frame sequence are taken for calculationof the feature vectors for some embodiments (described below). Due tothe usage of the energy change instead of the absolute magnitude and tothe low requirements to spectral characteristics of the filterbank 205,a variety of time-frequency domain transforms may be used instead of theFFT described above. For example, a Modified Discrete Cosine Transform(MDCT) may be used. One advantage of the MDCT is its low complexity, asis may be computed using only one n/4 point FFT and some pre- andpost-rotation of the samples. Accordingly, a filterbank 205 implementedwith MDCT is expected to perform better than one implemented with a FFT,e.g., able to calculate transforms twice as fast.

In another embodiment, the analysis filterbank 205 is implemented usingthe MP3 hybrid filterbank, which includes a cascading polyphase filterand a MDCT followed by aliasing cancellation. The MP3 filterbankproduces 576 spectral coefficients for every frame 105 of audioconsisting of 576 samples. For audio sampled at 8 kHz, the resultingframe rate is 13.8 fps compared to 15.626 fps of a 1024-point FFTfilterbank described above. The frame rate difference is set off duringthe time-frequency analysis when the data are resampled, as discussedbelow. The analysis filterbank 205 may also be implemented using aQuadrature Mirror Filter (QMF). The first stage of MP3 hybrid filterbankemploys a QMF filter with 32 equal-width bands. Accordingly, the 250 to2250-Hz frequency range of an 11,025-Hz audio signal may thus be dividedinto 13 bands.

One advantage of the MP3 filterbank is its portability. There are highlyoptimized implementations of MP3 filterbanks for different CPUs.Accordingly, the fingerprint generation routine can be easily integratedwith the MP3 encoder, which may obtain spectral coefficients from theMP3 filterbank without additional processing. Accordingly, thefingerprint generation routine can be easily integrated with the MP3decoder, which may obtain spectral data directly from a MP3 bit streamwithout its complete decoding. Integration with other audio codecs isalso possible.

Once it is determined, the sub-band samples are buffered and provided toone or more nonlinear resamplers 210. In one embodiment, each nonlinearresampler 210 corresponds to one of the M frequency bands. Eachnonlinear resampler 210 thus receives a sequence of S samples for aparticular frequency band linearly spaced in time (e.g., where S isselected to be from 64 to 80, depending on the filterbank'simplementation). In one embodiment, each resampler 210 logarithmicallymaps the sub-band samples in one of the M bands, producing a series of Tsamples (e.g., where T=64) that are logarithmically spaced in time. Whenthis is performed for each of the M bands, the data can be stored in a[M×T] matrix, which corresponds to a sampled spectrogram having a time(horizontal) axis with logarithmic scale. Logarithmic sampling is justone possibility, however, and in other embodiments other types ofnonlinear sampling may be performed, such as exponential resampling.

The sub-band samples are then provided to one or more FFT modules 215,which perform a transform on the nonlinearly mapped samples for eachband. In one embodiment, a T-point FFT is performed on the log-mappedband samples for each band (e.g., each row of the [M×T] matrix). Theresulting series of coefficients from the FFT is called a featurevector. In one embodiment, the feature vector for each band comprisesevery other coefficient of the FFT computed for that band in order ofascending frequency. Accordingly, each feature vector would include Ncoefficients (e.g., where N=T/2=32).

Although the FFT modules 215 are described as performing a FFT on thesub-band samples, in other embodiments the FFT modules 215 are replacedby processing modules that perform other time-frequency transforms. Forexample, instead of the FFT, the Discrete Cosine Transform (DCT) or theDiscrete Hartley Transform (DHT) may be used to transform the sub-bandsamples. In particular, using the DHT tends to produce a low falsepositive rate and de-correlated index values, which helps to make thesearch algorithm faster. In another embodiment, linear prediction codingis used as the second transform in place of the FFT modules 215.

The feature vectors are then provided to a differential encoder 225,which generates a fingerprint 115 for the audio sample. In oneembodiment, the differential encoder 225 subtracts the feature vectorscorresponding to each pair of adjacent bands. If there are M bands,there are M−1 pairs of adjacent bands. Subtracting two feature vectorsgives a vector of N difference values. For each of these differencevalues, the differential encoder 225 selects a 1 if the difference isgreater than or equal to 0, and the differential encoder 225 selects a 0is the difference is less than 0. For each group of four bits in thesequence, the encoder assigns a bit value according to a codebook table.The best codebook values are calculated during tuning and training ofthe fingerprinting algorithm. Repeating this process for the featurevectors of each of the consecutive pairs of bands results in a[(M−1)×N/4] matrix of bits. This matrix, which can be represented as alinear bit sequence, is used as the audio fingerprint 115. In theexample where M=13 and N=8, the fingerprint 115 has 12 bytes ofinformation.

In one embodiment, the Principal Component Analysis (PCA) is used tode-correlate and reduce size of the obtained feature vector before it isquantized. Other de-correlation techniques, such the Digital CosineTransform, may be used in addition or alternatively to eliminateredundancy and compact the feature vector.

In one embodiment, the fingerprint extraction system 200 generates aplurality of fingerprints for a highly overlapped series of audio framesin a particular audio signal. In one example, each series of frames 105processed by the system 200 contains three seconds of the audio signaland starts 64 milliseconds after a previous series starts. In this way,a fingerprint is generated for a number of three-second portions of theaudio signal that begin every 64 milliseconds. To implement such ascheme, the fingerprint extraction system 200 may include memory buffersbefore and after the analysis filterbank 205, where the buffers areupdated with the next 64 milliseconds of the audio signal as the nextaudio frame 105 is received.

Acoustic Model

In various applications of the fingerprinting system, certain frequencybands may be insignificant because they are imperceptible, because anencoding process for the audio sample removed the bands, or for someother reason. In one embodiment, therefore, an acoustic model 235 isused to identify and mark the insignificant frequency bands for aparticular fingerprint. Acoustic models, such as the psychoacousticmodel, are well known in various audio processing fields. A set of modelparameters for the acoustic model 235 can be calculated for high qualityreference samples during the creation of a fingerprint 115 and stored inthe database 125. The insignificant bands in the fingerprint 115 can bemarked by zeroing out their corresponding values (i.e., bits). Thiseffectively causes the bands to be ignored in any subsequent matchingprocess, since in the process of matching of a fingerprint with thedatabase records, only pairs of correspondent bands that have non-zerovalues are used to distinguish the fingerprint 115. Masked bands (i.e.,those having zero values) may also be excluded from comparisonaltogether.

In one embodiment, the acoustic model is a psychoacoustic model for thehuman auditory system. This may be useful where the purpose of thefingerprinting system is the identification of audio targeted humanauditory system. Such audio may be compressed by one or more perceptualencoders removing irrelevant audio information. The use of the humanpsycho acoustic model allows identifying and excluding such irrelevantbands from the fingerprints.

But the psychoacoustic model is just one type of an acoustic model thatis suited to human perceptual encoded audio. Another acoustic model is amodel that mimics the properties of a specific recording device. Eachband for such a recording device acoustic model may have a weight factorassigned to it depending on its importance. Yet another acoustic modelmimics the properties of specific environments, such as background noisefound in a vehicle or room. In such an embodiment, each band for theacoustic model may have a weight factor assigned to it depending on itsimportance in the environment for which the system is designed.

In one embodiment, parameters of the acoustic model 235 and filterbank205 depend on the type and properties of the analyzed audio signal 100.Different profiles comprising a set of subband weight factors and anumber of filterbank bands and their frequency distributions are used toobtain a better match of the properties of the targeted audio signal.For speech-like audio, for example, the power of the signal is mainlyconcentrated in low frequency bands, while music might contain higherfrequency relevant components depending on genre. In one embodiment, theparameters of the acoustic model are calculated from the reference audiosignal and stored in content database together with generatedfingerprints. In another embodiment, the parameters of the acousticmodel are calculated dynamically based on properties of analyzed audiosignal during the matching process.

Accordingly, possible applications of the acoustic model 235 includetuning the audio recognition parameters for specific environment and/orrecording device and encoding algorithm properties. For example, knowingacoustical properties of the cell phone audio path (microphonecharacteristics, audio processing and compression algorithms, and thelike) allows the development of an acoustic model that mimics theseproperties. Using this model during fingerprint comparison maysignificantly increase robustness of the matching process of thegenerated fingerprints.

Fingerprint Indexing and Matching

In one embodiment, a fingerprint indexer 230 generates an index for eachfingerprint 115. The fingerprints 115 are then stored in the fingerprintdatabase 125, allowing for efficient searching and matching of thecontents of the fingerprint database 125. In an embodiment, the indexfor a fingerprint 115 comprises a portion of the fingerprint 115.Accordingly, the fingerprints 115 in the fingerprint database 125 areindexed according to useful identifying information about them.

In an embodiment described above in which each fingerprint 115 comprisesa [(M−1)×N/4] matrix of bits, the indexer 230 uses the bits from theleftmost columns as the index. In the example where each fingerprint 115is a 12 by 8 matrix of bits, the index for the fingerprint 115 may bethe leftmost two columns of bits (24 bits total). In this way, the bitsused as the index for each fingerprint 115 are a subset of thefingerprint 115 that are based on the low frequency spectralcoefficients of the feature vectors used to computer the fingerprint115. These bits thus correspond to the low frequency components of thespectrum of the log-mapped spectrogram bands, which are stable andinsensitive to moderate noise and distortions. With a high level ofprobability, therefore, similar fingerprints would have the samenumerical value of the index. In this way, the index may be used tolabel and group similar and likely matching fingerprints in database.

FIG. 3 illustrates a method of matching a test fingerprint to thefingerprint database 125 using the indexes described above, inaccordance with one embodiment of the invention. To find a match in thefingerprint database 125 for a test fingerprint, the matching algorithmbegins by computing 310 an index value for the test fingerprint asdescribed above. Using this index value, a group of candidatefingerprints is obtained 320, for example, where the group includes allof the fingerprints in the database 125 that have the same index value.As explained above, it is highly likely that any matches in the database125 are in this group of candidate fingerprints because of the way theindex value is computed.

To test for any matches in the group of candidate fingerprints, a biterror rate (BER) between the test fingerprint and each candidatefingerprint is computed 330. The BER between two fingerprints is thepercentage of their corresponding bits that do not match. For unrelatedcompletely random fingerprints, the BER would be expected to be 50%. Inone embodiment, two fingerprints are matching where the BER is less thanabout 35%; however, other numerical limits may be used depending on thedesired tolerance for false positives and/or false negatives. Inaddition, calculations or criteria other than BER can be used to comparetwo fingerprints. For example, the inverse measure of BER, the matchrate may be also used. Moreover, certain bits may be weighted morehighly than others in the comparison of two fingerprints.

If 340 there are no matches within the predetermined matching criteria,or if 350 there are no more indexes to modify, the matching algorithmhas failed to find any matches of the test fingerprint in the database125. The system may then continue to search (e.g., using lessrestrictive criteria in obtaining the candidate fingerprints) or maystop. If 340 there are one or more matching fingerprints, a list of thematching fingerprints is returned 360.

In one embodiment, the system may repeat the search as described aboveafter modifying 370 the calculated fingerprint index in order to obtaina different set of candidate fingerprints from which to search for amatch. To modify 370 the calculated fingerprint index, one or multiplebits of the calculated fingerprint index may be flipped. In one examplewhere the fingerprint index has 24 bits, after failing to find a matchusing the original fingerprint index, the search step is repeated 24times with a different single bit of the 24-bit fingerprint indexflipped each time. Various other techniques can be used to enlarge thesearch space.

In one embodiment, the fingerprint indexer 230 generates one or moreindexes by selecting index bits from one or more fingerprints based on aset of frequency band weight factors calculated by the acoustic model235 and previously stored in the database 125. When multiple indexes areused, including indices obtained by bit flipping, the group of candidatefingerprints includes all candidates obtained for every calculatedindex.

In another embodiment, the area of search may be narrowed byprescreening and selecting only fingerprint candidates found in most orall candidate groups obtained for each calculated index. Prescreening ofthe multiple fingerprint candidates groups by using multiple indices,including indices obtained by bit flipping, may significantly improvethe performance of the database search. In one embodiment, indexes andreferences to possible fingerprint candidates are stored in computermemory allowing fast selection and prescreening of the fingerprintcandidates. On the second step (step 320), only fingerprint candidatesthat have the highest probability to match given fingerprint are loadedinto computer memory and compared. This approach allows fast search bykeeping only small indices in computer memory, while storing largerfingerprints on slow devices (e.g., a hard drive or over a network).

Detecting Edges of an Audio Frame

In some applications, it may be desirable to detect the edges of amatching audio fragment. Edge detection allows the system to knowprecisely where a particular matching audio fragment occurs in time.Depending on the quality of the analyzed audio, embodiments of the edgedetection algorithm may be able to detect the edges of a matching audiofragment with about 0.1 to 0.5 seconds of precision.

As explained above, embodiments of the fingerprinting techniqueaccumulate audio samples in sub-band processing buffers. Because of thisbuffering, the output of the fingerprinting algorithm is delayed andsmeared on audio fragment edges. This effect is illustrated in FIG. 4,which is a graph of the bit error rate (BER) over time between referencefingerprints for an audio fragment and a series of fingerprintsgenerated over time for an incoming sample audio stream. In theembodiment illustrated, the sub-band buffers hold three seconds ofaudio, and a match-is declared when two fingerprints have a bit errorrate (BER) of 35% or less.

Initially, at time TO, the sub-band processing buffers are empty, andthe generated fingerprint thus produces zero matches with the originalaudio (i.e., the BER is expected to be approximately equal to 50%). Asaudio samples are added to the sub-band buffers the BER decreases,indicating a better match. After sufficient time passes, the BERdecreases below the threshold 35% at time Ti, indicating a match.Finally, at time T2, the BER reaches a plateau as the buffers are filledby samples. When the fingerprinting algorithm passes the end of thecorrespondent audio fragment, at time T3, it begins to producefingerprints that match less and thus have an increasing BER, whichreaches the recognition threshold 35% at time T4. The duration ofobtained match curve (T1-T4) and the duration of the plateau (T2-T3) areeach shorter than the duration of the matched audio fragment (T0-T3).

In one embodiment, an edge detection algorithm is used to determine theexact edges of a matching audio frame or fragment. A BER curve such asillustrated in FIG. 4 is obtained. The BER curve is segmented intoregions, which correspond to the beginning of match with decreasing BER(e.g., T1-T2), the plateau with approximately constant BER (e.g.,T2-T3), and the end of match with increasing BER (e.g., T3-T4). Becausea real BER curve will generally be noisy, it is segmented using anappropriate technique such as a regression analysis. In one embodiment,all samples that produce BER above 35% are ignored because they may notbe reliable. The beginning of the matching audio fragment (i.e., timeT1) may then be calculated using linear regression as the crossing of aline that fits in the best way a decreasing BER region (e.g., T1-T2)with a horizontal line that corresponds to 50% BER. A similar approachmay be applied to estimate time T5, taking the intersection of a linethat fits in the best way an increasing BER region (e.g., T3-T4) and ahorizontal line that corresponds to 50% BER. In this case, however, timeT5 corresponds to the end of the fragment delayed by the duration B ofthe sub-band buffer, not the actual end of the matching audio fragment.The location of the end of the fragment (i.e., time T3) can becalculated by subtracting the sub-band buffer duration B from theobtained estimate T5.

In another embodiment, the end of the matching audio fragment isestimated as the end of the region T2-T3, and the beginning of the audiofragment is calculated by subtracting the duration of the sub-bandbuffer B from time T2, which corresponds to the beginning of the regionT2-T3.

Although discussed in terms of vectors and matrices, the informationcomputed for any fingerprint or sub-fingerprint may be stored andprocessed in any form, not just as a vector or matrix of values. Theterms vector and matrix are thus used only as a convenient mechanism toexpress the data extracted from an audio sample and is not meant to belimiting in any other way. In addition, although the power spectrum isdiscussed in terms of a spectrogram, it is understood that the datarepresenting the power spectrum or spectral analysis of an audio signalmay be represented and used not only as a spectrogram, but in any othersuitable form.

In one embodiment, a software module is implemented with a computerprogram product comprising a computer-readable medium containingcomputer program code, which can be executed by a computer processor forperforming any or all of the steps, operations, or processes describedherein. Accordingly, any of the steps, operations, or processesdescribed herein can be performed or implemented with one or moresoftware modules or hardware modules, alone or in combination with otherdevices. Moreover, any portions of the system described in terms ofhardware elements may be implemented in software, and any portions ofthe system described in terms of software elements may be implemented inhardware, such as hard-coded into a dedicated circuit. For example, codefor performing the methods described can be embedded in a hardwaredevice, for example in an ASIC or other custom circuitry. This allowsthe benefits of the invention to be combined with the capabilities ofmany different devices.

In another embodiment, the fingerprinting algorithm is embedded in andrun on any of a variety of audio devices, such as a cellular phone, apersonal digital assistant (PDA), a MP3 player and/or recorder, aset-top box, or any other device that stores or plays audio content.Embedding the fingerprinting algorithm on such a device may have anumber of benefits. For example, generating audio fingerprints directlyon a cellular phone would provide better results compared to sendingcompressed audio from the phone to a fingerprinting server over cellnetwork. Running the algorithm on the cellular phone eliminatesdistortions caused by GSM compression, which was designed to compressspeech and performs poorly on music. Accordingly, this approach maysignificantly improve the recognition of audio recorded by a cellularphone. It also reduces the load on servers as well as network traffic.

Another benefit of such an embedded approach is the ability to monitorlistening experience without violation of privacy and user rights. Forexample, a recording device may record audio, create fingerprints, andthen send only fingerprints to a server for analysis. The recorded audionever leaves the device. The server may then identify targeted music oradvertisements using the sent fingerprints, even though it would beimpossible to recover the original audio from the fingerprints.

The foregoing description of the embodiments of the invention has beenpresented for the purpose of illustration; it is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Persons skilled in the relevant art can appreciate that manymodifications and variations are possible in light of the aboveteachings. It is therefore intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto.

1. A method for extracting an audio fingerprint from an audio frame, themethod comprising: filtering the audio frame into a plurality offrequency bands to produce a corresponding plurality of filtered audiosignals; resampling the filtered audio signals at a nonlinear timescale;transforming the resampled audio signals for each frequency band toproduce a feature vector for the frequency band; and computing the audiofingerprint based on the set of feature vectors.
 2. The method of claim1, wherein filtering the audio frame into a plurality of frequency bandscomprises band pass filtering the audio frame in each of the pluralityof frequency bands.
 3. The method of claim 1, wherein filtering theaudio frame into a plurality of frequency bands comprises performing aFast Fourier Transform (FFT) on the audio sample.
 4. The method of claim1, wherein the audio frame is part of an audio file stored in an MP3format, and the filtered audio signals are obtained from an MP3 hybridfilterbank associated with the audio file.
 5. The method of claim 1,wherein the filtered audio signals are resampled at a logarithmictimescale.
 6. The method of claim 1, wherein the frequency bands arespaced linearly in a frequency axis.
 7. The method of claim 1, whereinthe frequency bands overlap.
 8. The method of claim 1, whereintransforming the resampled filtered audio signal of a particularfrequency band comprises performing a Fast Fourier Transform (FFT) onthe resampled audio signal.
 9. The method of claim 1, wherein computingthe audio fingerprint comprises differentially encoding the featurevectors for the frequency bands.
 10. The method of claim 1, furthercomprising: computing an index value for the audio fingerprint, theindex value comprising a portion of the audio fingerprint.
 11. Themethod of claim 10, wherein the index value comprises a portion of theaudio fingerprint that corresponds to a set of low frequency componentsof the transformed audio signals.
 12. The method of claim 1, furthercomprising: disregarding a portion of the audio fingerprint, where thedisregarded portion of the audio fingerprint corresponds to a frequencyrange determined to be insignificant according to an acoustic model. 13.The method of claim 12, wherein the acoustic model is a psychoacousticmodel.
 14. The method of claim 12, wherein the acoustic model mimics theproperties of an audio encoding process.
 15. The method of claim 12,wherein the acoustic model mimics the properties of an environment. 16.The method of claim 12, wherein the acoustic model mimics the propertiesof an audio signal.
 17. A method for creating a database of audiofingerprints, the method comprising: generating a plurality of audiofingerprints, each audio fingerprint generating according to the methodof claim 1; computing an index value for each audio fingerprint, theindex value comprising a portion of the audio fingerprint; and groupingthe audio fingerprints in the database according to their index values.18. A method for detecting an edge of an audio fragment, the methodcomprising: receiving a input signal representing the audio fragment;storing in a buffer of finite length a most recent portion of thereceived input signal; for each a plurality of times while receiving theinput signal, computing a fingerprint for the portion of the receivedinput signal stored in the buffer according to the method of claim 1;computing a bit error rate (BER) between each of the computedfingerprints and a reference fingerprint associated with the audiofragment; and identifying an edge of the audio fragment based on thecomputed BERs over time.
 19. The method of claim 18, wherein identifyingan edge of the audio fragment comprises: finding a best fit linematching a portion of the computed BERs during a period of decreasingBER over time; and identifying a beginning edge of the audio fragment asan intersection between the best fit line and a horizontal line in whichBER equal to 50%.
 20. The method of claim 18, wherein identifying anedge of the audio fragment comprises: finding a best fit line matching aportion of the computed BERs during a period of increasing BER overtime; and identifying an ending edge of the audio fragment as anintersection between the best fit line and a horizontal line in whichBER equal to 50%, subtracted by the length of the buffer.
 21. A methodfor extracting an audio fingerprint from an audio frame, the methodcomprising: a step for computing a spectrogram for the audio frame;sampling the spectrogram at a nonlinear time scale for a plurality offrequency bands in the spectrogram; a step for extracting a long-termfeature vector using the samples from each of the sampled frequencybands; and a step for generating the audio fingerprint based on thefeature vectors.
 22. The method of claim 21, wherein the spectrogram issampled at a logarithmic timescale.
 23. A computer program product forextracting an audio fingerprint from an audio frame, the computerprogram product comprising a computer-readable medium containingcomputer program code for performing the method comprising: filteringthe audio frame into a plurality of frequency bands to produce acorresponding plurality of filtered audio signals; resampling thefiltered audio signals at a nonlinear timescale; transforming theresampled audio signals for each frequency band to produce a featurevector for the frequency band; and computing the audio fingerprint basedon the set of feature vectors.
 24. The computer program product of claim23, wherein filtering the audio frame into a plurality of frequencybands comprises band pass filtering the audio frame in each of theplurality of frequency bands.
 25. The computer program product of claim23, wherein filtering the audio frame into a plurality of frequencybands comprises performing a Fast Fourier Transform (FFT) on the audiosample.
 26. The computer program product of claim 23, wherein the audioframe is part of an audio file stored in an MP3 format, and the filteredaudio signals are obtained from an MP3 hybrid filterbank associated withthe audio file.
 27. The computer program product of claim 23, whereinthe filtered audio signals are resampled at a logarithmic timescale. 28.The computer program product of claim 23, wherein the frequency bandsare spaced linearly in a frequency axis.
 29. The computer programproduct of claim 23, wherein the frequency bands overlap.
 30. Thecomputer program product of claim 23, wherein transforming the resampledfiltered audio signal of a particular frequency band comprisesperforming a Fast Fourier Transform (FFT) on the resampled audio signal.31. The computer program product of claim 23, wherein computing theaudio fingerprint comprises differentially encoding the feature vectorsfor the frequency bands.
 32. The computer program product of claim 23,further comprising: computing an index value for the audio fingerprint,the index value comprising a portion of the audio fingerprint.
 33. Thecomputer program product of claim 32, Wherein the index value comprisesa portion of the audio fingerprint that corresponds to a set of lowfrequency components of the transformed audio signals.
 34. The computerprogram product of claim 23, further comprising: disregarding a portionof the audio fingerprint, where the disregarded portion of the audiofingerprint corresponds to a frequency range determined to beinsignificant according to an acoustic model.
 35. The computer programproduct of claim 34, wherein the acoustic model is a psychoacousticmodel.
 36. The computer program product of claim 34, wherein theacoustic model mimics the properties of an audio encoding process. 37.The computer program product of claim 34, wherein the acoustic modelmimics the properties of an environment.
 38. The computer programproduct of claim 34, wherein the acoustic model mimics the properties ofan audio signal.